/** 
 * UploadTask.java
 * @author Lex
 * 2007-9-6 ����07:57:09
 */
package org.lex.ftp.queue;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.swing.Icon;

import org.lex.ftp.FTP;
import org.lex.io.IO;
import org.lex.net.ftp.IFTPFile;


public class UploadTask extends XloadTask {
	public UploadTask(FTP app, String ftpPath, IFTPFile ftpFile, File file) {
		super(app, ftpPath, ftpFile, file);
	}

	public Icon getIcon() {
		return TaskIconUtils.getUploadTaskIcon(this);
	}

	public long getLength() {
		return file.length();
	}

	public String getSource() {
		return IO.getCanonicalPath(file);
	}

	public Icon getSourceIcon() {

		return this.getFileIcon(file);
	}

	public String getDestination() {
		return ftpFile.getFullPath();
	}

	public Icon getDestinationIcon() {
		return this.getFTPFileIcon(ftpFile);
	}

	public String getDescription() {
		return "Upload " + file.getName();
	}

	public boolean hasChild() {
		return file.isDirectory();
	}

	public void expandChildren() {
	}

	public OutputStream openOutputStream() throws IOException {
		return null;
	}

	public InputStream openInputStream() throws IOException {
		return null;
	}
}
